package com.lg.utils.hutool.util;

import cn.hutool.core.lang.Console;
import cn.hutool.core.util.NumberUtil;

public class NumberUtilTest {
    public static void main(String[] args) {
        Double te1=123456.123456;
        double te2=123456.128456;
        Console.log(NumberUtil.round(te1,4));//结果:123456.1235
        Console.log(NumberUtil.roundStr(te2,2));//结果:123456.13
        System.out.println(NumberUtil.isNumber(te1.toString()));
        System.out.println(NumberUtil.isInteger(te1.toString()));
//      阶乘
//        System.out.println(NumberUtil.factorial(2,3));
//      平方
        System.out.println(NumberUtil.pow(2, 3));
//      开平方
        System.out.println(NumberUtil.sqrt(16));

    }
}
